package view;

import model.Ghost;
import java.awt.*;

public class GhostView {
    private Ghost ghost;
    public GhostView(Ghost ghost) {
        this.ghost = ghost;
    }
    public void draw(Graphics g, int tileSize) {
        Image img = ghost.getImage();
        if (img != null) {
            g.drawImage(img, ghost.col * tileSize, ghost.row * tileSize, tileSize, tileSize, null);
        } else {
            g.setColor(Color.RED);
            g.fillOval(ghost.col * tileSize, ghost.row * tileSize, tileSize, tileSize);
        }
    }
} 